//============================================================================
// Name        : test2.cpp
// Author      : Rohith
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * main.cc
 * Copyright (C) rohithdv 2010 <rohithdv@ecl>
 *
 * Assignment1-GameTheory is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Assignment1-GameTheory is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

using namespace std;
#include <iostream>
#include <boost/regex.hpp>
#include <boost/xpressive/regex_token_iterator.hpp>
#include <boost/foreach.hpp>
#include <string>
#include <iostream>
#include <iterator>
#include <boost/regex.hpp>
#include <boost/algorithm/string/regex.hpp>
#include <vector>
#include "s-f-game.h"

using namespace std;
using namespace boost;

int main(int argc, char* argv[])
{
	if (argc < 2) {
		cout << "<executable file name> <ROOT_FOLDER_LOCATION> <INPUT_FILE_NAME_GAMBIT_FORMAT>" << endl;
		exit(0);
	}
	std::string rootFolder (argv[1]);
	std::string inputFileName (argv[2]);
        
	SFGame *game = new SFGame(rootFolder);
	int res = game->readGameFromFile(rootFolder, inputFileName);
	if (res == -1) {
		delete game;
		return 0;
	}
	game->iteratedEliminationOfDominatedStrategies();
	game->findNashEquilibriaByTabuSearch();
	game->displayALLPSNE();
	delete game;
	return 0;
}

